import requests
import CityDataService
def getCityData():
    """
    获取网页城市数据
        :return:
    """
    url = "https://www.jianzhimao.com/ctrlcity/changeCity.html"

    headers = {
        "user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.44"
    }
    response = requests.get(url=url,headers=headers)
    CityDataService.processingData(response)

"""
mvc
获取页面数据
分析数据(xpath)
写入数据库

"""
if __name__ == '__main__':
    getCityData()